package cn.iocoder.yudao.module.shop.revenue.pojo.po;

import cn.iocoder.yudao.framework.business.basic.pojo.po.MerchantScopeEntity;
import cn.iocoder.yudao.framework.validation.InEnumValue;
import cn.iocoder.yudao.module.api.shop.revenue.enums.RevenueStatusEnum;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * <pre>
 * OOoO0OOoO0OOOooo0oOOOO0OOOOO0oooOO0ooOOO0Ooooo0OOOOo0ooooO0OOooo0Ooooo0OOOOO
 * 数据库表实体
 * OOoO0OOoO0OOOooo0oOOOO0OOOOO0oooOO0ooOOO0Ooooo0OOOOo0ooooO0OOooo0Ooooo0OOOOO
 * </pre>
 *
 * @author 山野羡民（1032694760@qq.com）
 * @since 2025/04/30
 */
@Data
@TableName("shop_revenue")
@Schema(description = "商家营业收益")
public class ShopRevenue extends MerchantScopeEntity {

    @Schema(description = "交易单号")
    private String tradeNo;

    @Schema(description = "订单项编号")
    private Long orderItemId;

    @Schema(description = "订单项快照数据，JSON格式")
    private String orderSnapshot;

    @Schema(description = "订单金额，单位为分")
    private Integer orderPrice;

    @Schema(description = "实付金额，单位为分")
    private Integer payPrice;

    @Schema(description = "结算比例，0-100之间的数字")
    private Double settlementPercent;

    @Schema(description = "结算金额，单位为分")
    private Integer settlementMoney;

    @Schema(description = "来源用户编号")
    private Long sourceUserId;

    @Schema(description = "状态：0-待入账、1-已结算、2-已失效、3-已取消、3-已取消")
    @InEnumValue(value = RevenueStatusEnum.class)
    private Integer status;

    @Schema(description = "解冻时间")
    private LocalDateTime unfreezeTime;

    @Schema(description = "取消时间")
    private LocalDateTime cancelTime;

    @Schema(description = "备注")
    private String note;
}
